using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Markup.Xaml;
using Avalonia.Media;

namespace JMCOM.Components.EpsonRobot.NodeFlow;

public partial class NodesEditor : UserControl
{
    private TranslateTransform _translate = new();
    private ScaleTransform _scale = new() { ScaleX = 1, ScaleY = 1 };
    private TransformGroup _transformGroup = new();
    private Point _lastPoint;
    private bool _dragging = false;

    public NodesEditor()
    {
        InitializeComponent();
        _transformGroup.Children.Add(_scale);
        _transformGroup.Children.Add(_translate);
        //RootCanvas.RenderTransform = _transformGroup;
    }
}

public class BindingProxy : AvaloniaObject
{
    public static readonly StyledProperty<object?> DataContextProperty =
        AvaloniaProperty.Register<BindingProxy, object?>(nameof(DataContext));

    public object? DataContext
    {
        get => GetValue(DataContextProperty);
        set => SetValue(DataContextProperty, value);
    }
}